<?php
/**/
$xtpl->assign("URL_SITE",$URL_SITE);
/*$xtpl->assign("URL_SITE_SECURE",$URL_SITE_SECURE);*/
$xtpl->assign("URL_IMAGE",$URL_IMAGE);
/*$xtpl->assign("URL_UPLOAD",$URL_UPLOAD);*/
$xtpl->assign("URL_CSS",$URL_CSS);
$xtpl->assign("URL_JS",$URL_JS);
/**/
$rsConfig = @mysql_query("SELECT * FROM site_config WHERE config_id=1");
$rowConfig = @mysql_fetch_array($rsConfig);
$rowConfig[site_title_extra] = $rowConfig[site_title] . " - " . $page_header;
$xtpl->assign("siteConfig",$rowConfig);

$xtpl->assign('admin_username',$_SESSION[admin_username]);
/**/
/**/
$xtpl_menutop = new XTemplate ($PATH_TEMPLATE . "menutop.html");
$xtpl_menutop->assign("URL_SITE",$URL_SITE);
$xtpl_menutop->assign("URL_IMAGE",$URL_IMAGE);
$xtpl_menutop->parse("main");
$menu_top = $xtpl_menutop->text("main");
$xtpl->assign("menu_top",$menu_top);
/**/
if(is_array($menu_toolbar)){
	$xtpl_menutoolbar = new XTemplate ($PATH_TEMPLATE . "menu_toolbar.html");
	$xtpl_menutoolbar->assign("mod",$_GET[mod]);
	$xtpl_menutoolbar->assign("URL_SITE",URL_SITE);
	$xtpl_menutoolbar->assign("URL_IMAGE",$URL_IMAGE);
	
	foreach($menu_toolbar as $key=>$value){
		$xtpl_menutoolbar->parse("main.".$value);
	}
	$xtpl_menutoolbar->parse("main");
	$toolbar = $xtpl_menutoolbar->text("main");
	$xtpl->assign("menu_toolbar",$toolbar);
}
/**/
$xtpl->assign("page_header",$page_header);
/*js/css*/
$xtpl_JsCss = new Xtemplate($PATH_TEMPLATE."JsCss.html");
$xtpl_JsCss->assign("URL_CSS",$URL_CSS);
$xtpl_JsCss->assign("URL_JS",$URL_JS);
$xtpl_JsCss->assign("URL_IMAGE",$URL_IMAGE);
$xtpl_JsCss->parse("main");
$xtpl->assign("includeJsCss",$xtpl_JsCss->text("main"));
